package com.kwedding.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.kwedding.dto.app.RequestAddCustomer;
import com.kwedding.dto.web.ResponseWebDemoList;
import com.kwedding.service.app.CustomerService;
import com.kwedding.util.BackJson;
import com.kwedding.util.JsonBack;
import com.kwedding.util.JsonBackBase;
import com.kwedding.util.LoggerParent;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@Controller
@RequestMapping("/rest/customer")
@Api(tags = "客户信息")
public class CustomerController extends LoggerParent {

	@Autowired
	private CustomerService customerService;

	@ApiOperation("添加客户信息")
	@ResponseBody
	@RequestMapping(value = "insertCustomer", method = { RequestMethod.POST })
	private JsonBack insertCustomer(@RequestBody RequestAddCustomer addCustomer) {
		customerService.insertCustomer(addCustomer);
		return BackJson.success();
	}
}
